package com.example.book.config;


import com.baomidou.mybatisplus.plugins.PaginationInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

//配置MP的分页插件
@Configuration
public class MybatisPlusConfig {
    @Bean
    public PaginationInterceptor paginationInterceptor() {

        PaginationInterceptor page = new PaginationInterceptor();
        page.setLocalPage(true);// 开启 PageHelper 的支持
        page.setDialectType("mysql");
        return page;
    }

}
